﻿CREATE TABLE [dbo].[tblMaterial] (
    [MaterialID]          INT          IDENTITY (300, 1) NOT NULL,
    [MaterialName]        VARCHAR (50) NOT NULL,
    [MaterialCapacity]    INT          NOT NULL,
    [MaterialWarehouseFK] INT          NOT NULL,
    [MaterialFactoryFK]   INT          NOT NULL,
    PRIMARY KEY CLUSTERED ([MaterialID] ASC),
    CONSTRAINT [MaterialWarehouseFK] FOREIGN KEY ([MaterialWarehouseFK]) REFERENCES [dbo].[tblWarehouse] ([WarehouseID]),
    CONSTRAINT [MaterialFactoryFK] FOREIGN KEY ([MaterialFactoryFK]) REFERENCES [dbo].[tblFactory] ([FactoryID])
);

